//
// Camera.cpp for bomberman in /home/lefebv_w//workspace/cpp/bomberman/tests/compil
// 
// Made by damien lefebvre
// Login   <lefebv_w@epitech.net>
// 
// Started on  Thu May  2 18:33:21 2013 damien lefebvre
// Last update Thu May  2 18:40:35 2013 damien lefebvre
//

#include	"Camera.hh"

Camera::Camera(void)
  : m_position(0.0f, 0.0f, 900.0f), m_rotation(0.0f, 0.0f, 0.0f)
{}

void	Camera::initialize(void)
{
  // config of camera's frustum
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  gluPerspective(70.0f, 800.0f/600.0f, 1.0f, 10000.0f);
  gluLookAt(m_position.x, m_position.y, m_position.z,
	    0.0f, 0.0f, -1.0f,
	    0.0f, 1.0f, 0.0f);

  // set position of camera
  glMatrixMode(GL_MODELVIEW);
  glLoadIdentity();

  // activate deep test
  glEnable(GL_DEPTH_TEST);
  glDepthFunc(GL_LEQUAL);
}

void	Camera::update(gdl::GameClock const & gameClock, gdl::Input & input)
{
  (void)(gameClock);
  (void)(input);
}
